import Vue from "vue"
import VueRouter from 'vue-router'
import Main from '../views/Main.vue'
import Login from '../views/Login.vue'
import Welcome from '../views/Wel_Page.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/main',
        component: Main,
        children: [
            {
                path:'/user',
                name:'User',
                component:()=>import('@/views/MainHome/User'),
            },
            {
              path: '/host',
              name: 'Host',
              component:()=>import('@/views/MainHome/Host')
            },
            {
                path:'/log',
                 name:'Log',
                 component:()=>import('@/views/MainHome/Log'),
             },
            {
                path:'/apply',
                name:"Apply",
                component:()=>import('@/views/MainHome/Apply'),
            },
            {
                path:'/userhome',
                name:'UserHome',
                component:() => import('@/views/MainHome/UserHome'),
            },
            {
                path:'/cluster',
                name:'Cluster',
                component:() => import('@/views/MainHome/Cluster'),
            },
 
 
        ]
    },
    {
        path:'/Login',
        name:'Login',
        component: Login,
    },
    {
        path:'/',
        name:'Welcome',
        component: Welcome,
    }
]

const router = new VueRouter(
    {
        mode:'history',
        routes
    }
)
export default router